<?php 
  $qva_aboutusId = isset(qvaCore::$qvaOptions['aboutus']['content']) ? qvaCore::$qvaOptions['aboutus']['content'] : null;
  $qva_isEmpty = false;
  if (!empty($qva_aboutusId))
  {
    $qva_metaData = get_post_meta($qva_aboutusId, 'qva_aboutus', true);
    $qva_metaData = isset($qva_metaData['aboutus']) ? $qva_metaData['aboutus'] : null;
  }else{
    $qva_isEmpty = true;
  }

?>

<section class="aboutus" id="aboutus">
  <div class="container">

     <?php if ( isset(qvaCore::$qvaOptions['aboutus']['title']) || isset(qvaCore::$qvaOptions['aboutus']['short_description']) || isset(qvaCore::$qvaOptions['aboutus']['description']) ) : 

          if (  !empty(qvaCore::$qvaOptions['aboutus']['title']) || !empty(qvaCore::$qvaOptions['aboutus']['short_description']) || !empty(qvaCore::$qvaOptions['aboutus']['description']) ) :
    ?>


    <div class="heading">
      <div class="container">
        <?php 
          if (isset(qvaCore::$qvaOptions['aboutus']['title']) && !empty(qvaCore::$qvaOptions['aboutus']['title'])) printf(__( stripslashes('<h2>%s</h2>'), QVA_LANG ), qvaCore::$qvaOptions['aboutus']['title'] );  
        ?>
        
        <?php 
          if (isset(qvaCore::$qvaOptions['aboutus']['short_description']) && !empty(qvaCore::$qvaOptions['aboutus']['short_description'])) { printf(__( stripslashes('<h3>%s</h3>'), QVA_LANG ), qvaCore::$qvaOptions['aboutus']['short_description'] );};  

          if (isset(qvaCore::$qvaOptions['aboutus']['description']) && !empty(qvaCore::$qvaOptions['aboutus']['description'])) printf(__( stripslashes('<p>%s</p>'), QVA_LANG ),qvaCore::$qvaOptions['aboutus']['description'] );  
        ?>
      </div>
    </div>

  <?php endif; endif; ?>
    
    <?php   if (!$qva_isEmpty) : ?>

    <?php if ( isset($qva_metaData['aboutus_more']) && !empty($qva_metaData['aboutus_more']) ) : ?>
          
          <div class="row box">
          
        <?php  foreach ($qva_metaData['aboutus_more'] as $k => $aboutusName) :  ?> 
              <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 about"> <span class="round"><i class="<?php echo isset($qva_metaData['aboutus_icon'][$k]) ? $qva_metaData['aboutus_icon'][$k] : "";  ?>  fa-5x"></i></span>
                <?php  isset($aboutusName) ?  printf(__(stripslashes('<h3>%s</h3>'), QVA_LANG), $aboutusName) : ""; ?>
                <?php  isset($qva_metaData['aboutus_description'][$k]) ?  printf(__(stripslashes('<p>%s</p>'), QVA_LANG), $qva_metaData['aboutus_description'][$k]) : ""; ?>
              </div>
      <?php  endforeach; ?>

          </div>
      <?php   
        endif;
      endif;
      ?>
    
  </div>
  <!--Fact about us start-->
  <?php 
  if (!$qva_isEmpty) : 
        if ( isset($qva_metaData['fact_total'][0])  ) :
            $qva_check = ltrim($qva_metaData['fact_total'][0]);
              if (!empty($qva_check)) :
  ?>
  <div class="factabout">
    <div class="container">
      <?php 
         isset($qva_metaData['fact_title']) && !empty($qva_metaData['fact_title']) ?  printf(__( stripslashes('<h2>%s</h2>'), QVA_LANG), $qva_metaData['fact_title'])  : ""; 
      ?>
      <?php 
         isset($qva_metaData['fact_description']) && !empty($qva_metaData['fact_description']) ?  printf(__( stripslashes('<p>%s</p>'), QVA_LANG), $qva_metaData['fact_description'])  : ""; 
      ?>

      
      <div class="row countarea">
        <?php foreach ($qva_metaData['fact_total'] as $k => $total) : 
              $id =  uniqid("gravity_");
        ?>
                <div class=" col-lg-3 col-md-3 col-sm-3 col-xs-12">
                  <h3 class="timer" id="<?php echo $id ?>" data-from="0" data-to="<?php echo $total ?>" data-speed="10000">1</h3>
                  <?php  isset( $qva_metaData['fact_name'][$k] ) && !empty( $qva_metaData['fact_name'][$k] ) ? printf(__( stripslashes('<p>%s</p>'), QVA_LANG ), $qva_metaData['fact_name'][$k]) : ""; ?>
                </div>
        <?php endforeach;?>
      </div>
    </div>
  </div>
  <?php     
              endif;
        endif;
  endif;
  ?>
</section>
